Java syntax
part 3/46 · 86.7 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• Generics
• See also
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Basics
Identifier
An identifier is the name of an element in the code. There are certain standard naming conventions to follow when selecting names for elements. Identifiers in Java are case-sensitive.
An identifier can contain:
• Any Unicode character that is a letter (including numeric letters like Roman numerals) or digit.
• Currency sign (such as ¥).
• Connecting punctuation character (such as _).
An identifier cannot:
• Start with a digit.
• Be equal to a reserved keyword, null literal or Boolean literal.
Keywords
Keywords
The following words are keywords and cannot be used as identifiers under any circumstances.
• _
• abstract
• assert
• boolean
• break
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────